import { RouteRecordRaw } from 'vue-router'

export const initRoute: RouteRecordRaw[] = [
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
    },
  },
  {
    name: 'home',
    path: '/',
    component: () => import('@/layout/CommonLayout.vue'),
    redirect: '/welcome',
    meta: {
      title: '首页',
    },
    children: [
      {
        name: 'welcome',
        path: 'welcome',
        meta: {
          title: '欢迎使用拍信后台管理系统',
        },
        component: () => import('@/views/welcome/index.vue'),
      },
    ],
  },
  {
    name: '404',
    path: '/404',
    meta: {
      title: '🤔️页面不见了...',
    },
    component: () => import('@/views/404/index.vue'),
  },
]
